projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c89a31
)
log: Check printf() arguments
author
Simon Glass
<
[email protected]
>
Mon, 7 Jan 2019 23:44:19 +0000
(16:44 -0700)
committer
Simon Glass
<
[email protected]
>
Tue, 15 Jan 2019 00:47:13 +0000
(17:47 -0700)
At present logging does not check printf() arguments. Now that all users
have been corrected, enable this to prevent further problems.
Signed-off-by: Simon Glass <
[email protected]
>
include/log.h
patch
|
blob
|
history
diff --git
a/include/log.h
b/include/log.h
index 0f2bc19477fc868d0682009265ea5e8cb33a2d38..d7f647100618c3a568ff15295158f75eff16cb6f 100644
(file)
--- a/
include/log.h
+++ b/
include/log.h
@@
-73,7
+73,8
@@
static inline int log_uc_cat(enum uclass_id id)
* @return 0 if log record was emitted, -ve on error
*/
int _log(enum log_category_t cat, enum log_level_t level, const char *file,
- int line, const char *func, const char *fmt, ...);
+ int line, const char *func, const char *fmt, ...)
+ __attribute__ ((format (__printf__, 6, 7)));
/* Define this at the top of a file to add a prefix to debug messages */
#ifndef pr_fmt